package com.ryl.yomall.order.client;

import com.ryl.yomall.model.common.result.Result;
import com.ryl.yomall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(value = "service-order")
public interface OrderFeignClient {

    @GetMapping("/api/order/auth/trade")
    Result<Map<String, Object>> trade();
    @GetMapping("/api/order/getOrderInfo/{orderId}")
    OrderInfo getOrderInfo(@PathVariable Long orderId);
    @GetMapping("/api/order/auth/${page}/${limit}")
    Result getOrderPageList(@PathVariable Integer page ,@PathVariable Integer limit);
    @PostMapping("/api/order/inner/seckill/submitOrder")
    Long submitOrder(@RequestBody OrderInfo orderInfo);

}
